package Interface_sort;

import java.util.Arrays;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Employee[] staff = new Employee[3];

        staff[0] = new Employee("Harry Hacker",35000);
        staff[1] = new Employee("Carl Cracker",75000);
        staff[2] = new Employee("Tony Tester",38000);

        //排序
        Arrays.sort(staff);

        for(Employee e:staff)
        {
            System.out.println("姓名="+e.getName()+"，月薪="+e.getSalary());
        }
    }
}
